% =========================================================================
% Schniepp Lab, 2018-2021
% A helper function to plot the input data, tolerant of the data dimensions
% If mode == 'c', the input data will be plotted on the latest figure
% window;
% If mode != 'c', the input data will be plotted on a new figure window
% =========================================================================

function res=quickPlot(mode,data)
    if strcmp(mode,'c')
%         'c' means continue
    else
        figure();
    end
    [a,b]=size(data);
    if a<b
        data=data';
    end
    plot(data(:,1),data(:,2));
    hold on;
end